package com.neu.test;

import java.util.HashSet;
import java.util.Iterator;

public class Demo03 {
	public static   HashSet<Student> hs = new HashSet<>();
	public static void method() {
	hs.add(new Student("www.111.com", "喜洋洋"));
	hs.add(new Student("www.222.com", "美洋洋"));
	}
	
	public static void method01() {
		Iterator<Student> ite_hs = hs.iterator();
		while(ite_hs.hasNext()) {
//			Student a = ite_hs.next().getEmail();
			System.out.println(ite_hs.next().getEmail());
		}
	}
	public static void main(String[] args) {
		method();
		method01();   
	}
}
